<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Eigen: Eigen::Transpositions&lt; SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="eigendoxy.css" rel="stylesheet" type="text/css">
<!--  -->
<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Eigen_Silly_Professor_64x64.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="http://eigen.tuxfamily.org">Eigen</a>
   &#160;<span id="projectnumber">3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.svg"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classEigen_1_1Transpositions.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="classEigen_1_1Transpositions-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Eigen::Transpositions&lt; SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__DenseMatrixManipulation__chapter.html">Dense matrix and array manipulation</a> &raquo; <a class="el" href="group__DenseMatrixManipulation__Reference.html">Reference</a> &raquo; <a class="el" href="group__Core__Module.html">Core module</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_&gt;<br />
class Eigen::Transpositions&lt; SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ &gt;</h3>

<p>Represents a sequence of transpositions (row/column interchange) </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">SizeAtCompileTime</td><td>the number of transpositions, or Dynamic </td></tr>
    <tr><td class="paramname">MaxSizeAtCompileTime</td><td>the maximum number of transpositions, or Dynamic. This optional parameter defaults to SizeAtCompileTime. Most of the time, you should not have to specify it.</td></tr>
  </table>
  </dd>
</dl>
<p>This class represents a permutation transformation as a sequence of <em>n</em> transpositions \([T_{n-1} \ldots T_{i} \ldots T_{0}]\). It is internally stored as a vector of integers <code>indices</code>. Each transposition \( T_{i} \) applied on the left of a matrix ( \( T_{i} M\)) interchanges the rows <code>i</code> and <code>indices</code>[i] of the matrix <code>M</code>. A transposition applied on the right (e.g., \( M T_{i}\)) yields a column interchange.</p>
<p>Compared to the class <a class="el" href="classEigen_1_1PermutationMatrix.html" title="Permutation matrix.">PermutationMatrix</a>, such a sequence of transpositions is what is computed during a decomposition with pivoting, and it is faster when applying the permutation in-place.</p>
<p>To apply a sequence of transpositions to a matrix, simply use the operator * as in the following example: </p><div class="fragment"><div class="line">Transpositions tr;</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#ga731599f782380312960376c43450eb48">MatrixXf</a> mat;</div>
<div class="line">mat = tr * mat;</div>
<div class="ttc" id="agroup__matrixtypedefs_html_ga731599f782380312960376c43450eb48"><div class="ttname"><a href="group__matrixtypedefs.html#ga731599f782380312960376c43450eb48">Eigen::MatrixXf</a></div><div class="ttdeci">Matrix&lt; float, Dynamic, Dynamic &gt; MatrixXf</div><div class="ttdoc">Dynamic×Dynamic matrix of type float.</div><div class="ttdef"><b>Definition:</b> Matrix.h:500</div></div>
</div><!-- fragment --><p> In this example, we detect that the matrix appears on both side, and so the transpositions are applied in-place without any temporary or extra copy.</p>
<dl class="section see"><dt>See also</dt><dd>class <a class="el" href="classEigen_1_1PermutationMatrix.html" title="Permutation matrix.">PermutationMatrix</a> </dd></dl>
</div>
<p>Inherits Eigen::TranspositionsBase&lt; Derived &gt;.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4df850b81caf6c9ef7fb54803a75e6c2"><td class="memItemLeft" align="right" valign="top">IndicesType &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1Transpositions.html#a4df850b81caf6c9ef7fb54803a75e6c2">indices</a> ()</td></tr>
<tr class="separator:a4df850b81caf6c9ef7fb54803a75e6c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae947a24bf959e0c2d9cf504074f027ec"><td class="memItemLeft" align="right" valign="top">const IndicesType &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1Transpositions.html#ae947a24bf959e0c2d9cf504074f027ec">indices</a> () const</td></tr>
<tr class="separator:ae947a24bf959e0c2d9cf504074f027ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5439367fff2ed4bf4cb708e8e9121088"><td class="memTemplParams" colspan="2">template&lt;typename OtherDerived &gt; </td></tr>
<tr class="memitem:a5439367fff2ed4bf4cb708e8e9121088"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classEigen_1_1Transpositions.html">Transpositions</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classEigen_1_1Transpositions.html#a5439367fff2ed4bf4cb708e8e9121088">operator=</a> (const TranspositionsBase&lt; OtherDerived &gt; &amp;other)</td></tr>
<tr class="separator:a5439367fff2ed4bf4cb708e8e9121088"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae574c902f293b7fa5135ca377fd74f11"><td class="memTemplParams" colspan="2">template&lt;typename Other &gt; </td></tr>
<tr class="memitem:ae574c902f293b7fa5135ca377fd74f11"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classEigen_1_1Transpositions.html#ae574c902f293b7fa5135ca377fd74f11">Transpositions</a> (const <a class="el" href="classEigen_1_1MatrixBase.html">MatrixBase</a>&lt; Other &gt; &amp;<a class="el" href="classEigen_1_1Transpositions.html#ae947a24bf959e0c2d9cf504074f027ec">indices</a>)</td></tr>
<tr class="separator:ae574c902f293b7fa5135ca377fd74f11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00bfbe6d1616a1416fda70dded20d12f"><td class="memTemplParams" colspan="2">template&lt;typename OtherDerived &gt; </td></tr>
<tr class="memitem:a00bfbe6d1616a1416fda70dded20d12f"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classEigen_1_1Transpositions.html#a00bfbe6d1616a1416fda70dded20d12f">Transpositions</a> (const TranspositionsBase&lt; OtherDerived &gt; &amp;other)</td></tr>
<tr class="separator:a00bfbe6d1616a1416fda70dded20d12f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e16faa36124c9cc6ce76f60ee17906a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1Transpositions.html#a9e16faa36124c9cc6ce76f60ee17906a">Transpositions</a> (<a class="el" href="namespaceEigen.html#a62e77e0933482dafde8fe197d9a2cfde">Index</a> size)</td></tr>
<tr class="separator:a9e16faa36124c9cc6ce76f60ee17906a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a00bfbe6d1616a1416fda70dded20d12f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00bfbe6d1616a1416fda70dded20d12f">&#9670;&nbsp;</a></span>Transpositions() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ &gt; </div>
<div class="memtemplate">
template&lt;typename OtherDerived &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1Transpositions.html">Eigen::Transpositions</a>&lt; SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ &gt;::<a class="el" href="classEigen_1_1Transpositions.html">Transpositions</a> </td>
          <td>(</td>
          <td class="paramtype">const TranspositionsBase&lt; OtherDerived &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Copy constructor. </p>

</div>
</div>
<a id="ae574c902f293b7fa5135ca377fd74f11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae574c902f293b7fa5135ca377fd74f11">&#9670;&nbsp;</a></span>Transpositions() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ &gt; </div>
<div class="memtemplate">
template&lt;typename Other &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1Transpositions.html">Eigen::Transpositions</a>&lt; SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ &gt;::<a class="el" href="classEigen_1_1Transpositions.html">Transpositions</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classEigen_1_1MatrixBase.html">MatrixBase</a>&lt; Other &gt; &amp;&#160;</td>
          <td class="paramname"><em>indices</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Generic constructor from expression of the transposition indices. </p>

</div>
</div>
<a id="a9e16faa36124c9cc6ce76f60ee17906a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e16faa36124c9cc6ce76f60ee17906a">&#9670;&nbsp;</a></span>Transpositions() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1Transpositions.html">Eigen::Transpositions</a>&lt; SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ &gt;::<a class="el" href="classEigen_1_1Transpositions.html">Transpositions</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceEigen.html#a62e77e0933482dafde8fe197d9a2cfde">Index</a>&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructs an uninitialized permutation matrix of given size. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a4df850b81caf6c9ef7fb54803a75e6c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4df850b81caf6c9ef7fb54803a75e6c2">&#9670;&nbsp;</a></span>indices() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">IndicesType&amp; <a class="el" href="classEigen_1_1Transpositions.html">Eigen::Transpositions</a>&lt; SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ &gt;::indices </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>a reference to the stored array representing the transpositions. </dd></dl>

</div>
</div>
<a id="ae947a24bf959e0c2d9cf504074f027ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae947a24bf959e0c2d9cf504074f027ec">&#9670;&nbsp;</a></span>indices() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const IndicesType&amp; <a class="el" href="classEigen_1_1Transpositions.html">Eigen::Transpositions</a>&lt; SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ &gt;::indices </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>const version of <a class="el" href="classEigen_1_1Transpositions.html#a4df850b81caf6c9ef7fb54803a75e6c2">indices()</a>. </p>

</div>
</div>
<a id="a5439367fff2ed4bf4cb708e8e9121088"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5439367fff2ed4bf4cb708e8e9121088">&#9670;&nbsp;</a></span>operator=()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ &gt; </div>
<div class="memtemplate">
template&lt;typename OtherDerived &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1Transpositions.html">Transpositions</a>&amp; <a class="el" href="classEigen_1_1Transpositions.html">Eigen::Transpositions</a>&lt; SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype">const TranspositionsBase&lt; OtherDerived &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Copies the <em>other</em> transpositions into <code>*this</code> </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="Transpositions_8h_source.html">Transpositions.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceEigen.html">Eigen</a></li><li class="navelem"><a class="el" href="classEigen_1_1Transpositions.html">Transpositions</a></li>
    <li class="footer">Generated on Thu Apr 21 2022 13:07:56 for Eigen by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
